#include "stdafx.h"

#pragma once
#include "Resource.h"

/***************************************
 * The core class that maintains the main work-flow of the program
 ***/
class Application
{
public:
	static HINSTANCE hInst;
	static BOOL Init(HINSTANCE hInstance, int nCmdShow);
	static void RegisterPWnd(Wnd* PWnd, HWND HWnd);
	static int Run();
	static void End();
	static LRESULT CALLBACK AppWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
	static Document* GetDocument(){return &currentDoc;}
private:
	static Document currentDoc;
	static Wnd* pWndMain;
	static WndPointerTable PWNDTable;
	static BOOL InitWndMain(HINSTANCE hInstance, int nCmdShow);
	static LRESULT CALLBACK Application::InnerWndProc(Wnd*pWnd, HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
};


/***************************************
 * Record and provide the basic settings about Application
 ***/
class ApplicationSetting
{
public:
	static TCHAR szTitle[MAX_LOADSTRING];	//Name of Application
	static bool ShowGridLine;
	static bool ShowHeader;
	static float Zooming;
};